<header class="header">
		<div class="header_top ">
			<ul class="center">
			
				<#if session_user??>
					<li><p>${session_user.user_id}欢迎光临宏恒腾商城</p></li>
					<#else>
					<li><a href="${ctx}/customer/toLogin">请登录</a></li>				
				</#if>
				<li><a href="${ctx}/customer/toRegister">免费注册</a></li>
				<li><a href="${ctx}/customer/order/toUserInfo"><span class="glyphicon glyphicon-user"></span>&nbsp;我的宏恒</a></li>
				<li><a href="#"><span class="glyphicon glyphicon-heart span_heart"></span>&nbsp;我关注的商品</a></li>
				<li><a href="#"><span class="glyphicon glyphicon-heart span_heart"></span>&nbsp;消息</a></li>
				<li><a href="#"><span class="glyphicon glyphicon-star"></span>&nbsp;收藏夹</a></li>
				<li class="dropdown">
				    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th-list"></span>&nbsp;网站导航&nbsp;<b class="caret"></b></a>
					    <ol class="dropdown-menu">
							<li><a href="shop_list.html">商品列表</a></li>
							<li><a href="comments.html">商品评价</a></li>
							<li><a href="pay.html">支付</a></li>
							<li><a href="pay_successful.html">支付成功</a></li>
							<li><a href="pay_fail.html">支付失败</a></li>
							<li><a href="order_details.html">订单详情</a></li>
							<li><a href="confirm_order.html">确定订单页</a></li>
						</ol>
				</li>
			</ul>
		</div>

		<div class="header_middle center">
			<div class="logo">
				<a href="index.html"> 
					<img src="${ctx}/images/logo.png" alt="logo" />
				</a>
			</div>
			<div class="input_search">
				<form id="searchForm" action="${ctx}/customer/goods/goodsList" class="bs-example bs-example-form" role="form" >
					<div class="input-group">
		                <input name="title" type="search" class="form-control" placeholder="请输入关键词...">
		                <span class="input-group-btn">
		                <button class="btn btn-default" type="button">搜&nbsp;&nbsp;索</button>	       
		              	</span>
		            </div>
		       </form>
		       <script type="text/javascript">
		       	$(function(){
		       		$(".btn").click(function(){
		       			
		       			$("#searchForm").submit();
		       		});
		       	});
		       </script>
				<div class="search_keyword">
					<ul> 
						<li><a href="shop_list.html">电子狗</a></li>
						<li><a href="shop_list.html">行车记</a></li>
						<li><a href="shop_list.html">录车载蓝牙</a></li>
						<li><a href="shop_list.html">云后视镜</a></li>
						<li><a href="shop_list.html">GPS导航</a></li>
						<li><a href="shop_list.html">DVD导航 </a></li>
						<li><a href="shop_list.html">倒车后视</a></li>
					</ul>
				</div>
			</div>
			<div class="shopping">
				<a href="${ctx}/customer/goodsCar/getBuyCarList"><span class="glyphicon glyphicon-shopping-cart"></span>我的购物车<b class="badge" id="car_num">0</b></a>
				<script type="text/javascript">
					$(function(){
						$.post("${ctx}/customer/goodsCar/getBuyNums",function(data){
							
							$("#car_num").text(data.buyNums);
						});
					});
				</script>
			</div>
		</div>
		
		<script type="text/javascript">
			$(function(){				
				$.post("${ctx}/customer/getGoodsTypeAjax",function(data){
	
					
					for(var i = 0;i<data.maxGoodType.length;i++){
						
						var maxGoodTypeLi=$("<li></li>");
						$("<a></a>").attr("href","shop_list.html").text(data.maxGoodType[i].name).appendTo(maxGoodTypeLi);

						maxGoodTypeLi.appendTo("#maxType");
						
					}
					
					maxLi1=$("<li></li>");
					$("<a></a>").attr("href","shop_list.html").text("会员中心").appendTo(maxLi1);
					
					maxLi2=$("<li></li>");
					$("<a></a>").attr("href","shop_list.html").text("CPS论坛").appendTo(maxLi2);
					
					maxLi1.appendTo("#maxType");
					maxLi2.appendTo("#maxType");	
					
					for(var j = 0;j<data.minGoodType.length;j++){
						
						minTypeSpan = $("<span></span>").text(">");
						
						minTypeLi = $("<li></li>");
						
						minTypeA = $("<a></a>").attr("href","${ctx}/customer/goods/goodsList?goods_type.code="+data.minGoodType[j].code).text(data.minGoodType[j].name);
						
						minTypeSpan.appendTo(minTypeA);
						
						minTypeA.appendTo(minTypeLi);
						
						minTypeLi.appendTo("#minType");
					}					
				});				
			});
		</script>
		
		<div class="header_bottom">
				<div class="center">
					<div class="nav_bar">
						<div class="nav"><a href="javascript:void(0)"><span>商品分类</span><i></i></a>
						</div>
						<ul class="sub_Menu clear" id="minType">

						</ul>
					<div class="nav_list">	
						<ul id="maxType" >
							<li><a href="index.html" class="on">首页</a></li>
						</ul>
					</div>	
				</div>
			</div>
		</div>	
	</header>